#nullable enable

namespace NServiceBus;

using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// Represents an endpoint in the start-up phase.
/// </summary>
public interface IStartableEndpoint
{
    /// <summary>
    /// Starts the endpoint and returns a reference to it.
    /// </summary>
    /// <returns>A reference to the endpoint.</returns>
    Task<IEndpointInstance> Start(CancellationToken cancellationToken = default);
}